-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Functional Tests] Add timeout for comboBox list loading #73498
Conversation
Pinging @elastic/kibana-test-triage (failed-test) |
Pinging @elastic/kibana-app (Team:KibanaApp) |
💚 Build SucceededTo update your PR or re-run it, just comment with: |
@@ -55,6 +56,7 @@ export function ComboBoxProvider({ getService }) { | |||
|
|||
async _waitForOptionsListLoading(comboBoxElement) { | |||
await comboBoxElement.waitForDeletedByClassName('euiLoadingSpinner'); | |||
await PageObjects.common.sleep(1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any element we could wait for once this is done loading, so we wouldn't need to wait with an arbitrary amount of time here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately not, the problem here is that right before rendering filtered list, there's a flicker of unfiltered list with the same structure. We could try to refactor a comboBox or think about refactoring the whole test service, but as it's just 6.8, I feel like it's not worth the effort, especially because the solution above works well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, didn't test, but as discussed, the reported conversion of a 100% failure to a 100% success rate while testing against a cloud instance is convincing.
Summary
Fixes #22233
The test that fails follows these steps:
2.1. Open comboBox
2.2. Type 'osx' to filter it out
2.3. Choose the first filtered option
Between steps 2.2 and 2.3, the comboBox flickers and shows all the options. Instead of the right one, the first one is chosen - the problem is only reproducible on cloud, probably because it's a faster, stronger environment. Adding a timeout solves the issue.
The problem with this functional test was fixed with a complete refactoring of comboBox test service for version 7+ so we only need to fix it for 6.8.
Checklist
Delete any items that are not applicable to this PR.
For maintainers